package cn.com.klun.tjy.admin.vo;


import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class GlobalDataDictionaryCache {
    private ConcurrentMap<String, List<DictionaryVo>> cacheDataDictionary;

    public static final GlobalDataDictionaryCache getInstance() {
        return GlobalDataDictionaryCache.Singleton.singleton;
    }

    private GlobalDataDictionaryCache() {
        this.cacheDataDictionary = null;
        this.cacheDataDictionary = new ConcurrentHashMap();
    }

    public void putIdValue(String key, List<DictionaryVo> value) {
        this.cacheDataDictionary.put(key, value);
    }

    public List<DictionaryVo> getIdValue(String key) {
        return (List)this.cacheDataDictionary.get(key);
    }

    public List<DictionaryVo> remove(String key) {
        return (List)this.cacheDataDictionary.remove(key);
    }

    private static class Singleton {
        private static final GlobalDataDictionaryCache singleton = new GlobalDataDictionaryCache();

        private Singleton() {
        }
    }
}